import api from "../api";
import type Typings from "@/typings";

export default {
  developListApi: (
    data: Typings.Common.plainObj = {},
    config: Typings.Common.plainObj = {}
  ) => {
    const url = "/development/list";
    return api.get(url, data, { ...config });
  },

  developAddApi: (
    data: Typings.Common.plainObj = {},
    config: Typings.Common.plainObj = {}
  ) => {
    const url = "/development/add";
    return api.post(url, data, { ...config, openLoading: true });
  },

  developUpdateApi: (
    data: Typings.Common.plainObj = {},
    config: Typings.Common.plainObj = {}
  ) => {
    const url = "/development/update";
    return api.post(url, data, { ...config, openLoading: true });
  },

  developCheckApi: (
    data: Typings.Common.plainObj = {},
    config: Typings.Common.plainObj = {}
  ) => {
    const url = "/development/check";
    return api.get(url, data, { ...config });
  },

  developRemoveApi: (
    data: Typings.Common.plainObj = {},
    config: Typings.Common.plainObj = {}
  ) => {
    const url = "/development/remove";
    return api.get(url, data, { ...config });
  },

  developFinishApi: (
    data: Typings.Common.plainObj = {},
    config: Typings.Common.plainObj = {}
  ) => {
    const url = "/development/finish";
    return api.post(url, data, { ...config, openLoading: true });
  },

  developSetTopApi: (
    data: Typings.Common.plainObj = {},
    config: Typings.Common.plainObj = {}
  ) => {
    const url = "/development/setTop";
    return api.post(url, data, { ...config, openLoading: true });
  },

  developBatchApi: (
    data: Typings.Common.plainObj = {},
    config: Typings.Common.plainObj = {}
  ) => {
    const url = "/development/batch";
    return api.post(url, data, { ...config, openLoading: true });
  },
};
